package com.ellricky.tc_manager.ui.home.sign

import com.andr.common.http.callback.BaseCallback
import com.andr.common.ui.adapter.BaseRecyclerAdapter
import com.andr.common.ui.mvp.BasePresenter
import com.ellricky.baselib.http.callback.EListCallback
import com.ellricky.baselib.ui.base.BaseRefreshActivity
import com.ellricky.tc_manager.API_TODAY_SIGN
import com.ellricky.tc_manager.R
import com.ellricky.tc_manager.TodaySignAdapter
import com.ellricky.tc_manager.TodaySignEntity
@Deprecated("unused")
class TodaySignActivity : BaseRefreshActivity<Void, BasePresenter<Void>, TodaySignEntity>() {

    override fun initUIView() {
        super.initUIView()
        mTvTitle.setText(R.string.tm_today_sign)
    }

    override fun getResponseCallback(): BaseCallback {
        return object : EListCallback<TodaySignEntity>(this) {
            override fun onSuccess(data: MutableList<TodaySignEntity>?, msg: String?) {
                dataSource = data
                rvView.onLoadFinish(dataSource, refresh)
            }

            override fun onErrorCode(code: String?, msg: String?) {
                super.onErrorCode(code, msg)
                rvView.onRefreshFailed(refresh)
            }

            override fun onHttpError(code: String?, msg: String?) {
                super.onHttpError(code, msg)
                rvView.onRefreshFailed(refresh)
            }
        }
    }

    override fun getRvAdapter(): BaseRecyclerAdapter<TodaySignEntity>  = TodaySignAdapter(this)



    override fun getUrlPath(): String {
        return API_TODAY_SIGN
    }



}
